//for component\blockEle.ts
const Constants = {
  ZWSP: "\u200b",
};
const Lute = {
  Caret: "‸",
};
// replace (html:[\w\W]*?)(\},) to /*$1*/$2
const IHintData = [
  {
    filter: ["模版", "moban", "mb", "template"],
    value: Constants.ZWSP,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconMarkdown"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.template}</span></div>`,
     */
  },
  {
    filter: ["挂件", "widget", "gj", "guajian"],
    value: Constants.ZWSP + 1,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconBoth"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.widget}</span></div>`,
     */
  },
  {
    filter: ["资源", "assets", "zy", "ziyuan"],
    value: Constants.ZWSP + 2,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconImage"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.assets}</span></div>`,
     */
  },
  {
    filter: ["引用块", "yinyong", "yy", "block reference"],
    value: "((",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconRef"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.ref}</span><span class="b3-list-item__meta">((</span></div>`,
     */
  },
  {
    filter: ["嵌入块", "qianrukuai", "qrk", "embed block"],
    value: "{{",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSQL"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.blockEmbed}</span><span class="b3-list-item__meta">{{</span></div>`,
     */
  },
  {
    filter: ["ai chat"],
    value: Constants.ZWSP + 5,
    /*html: '<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSparkles"></use></svg><span class="b3-list-item__text">AI Chat</span></div>',
     */
  },
  {
    filter: [
      "数据库",
      "属性视图",
      "shujuku",
      "shuxingshitu",
      "sjk",
      "sxst",
      "database",
      "attribute view",
    ],
    value: '<div data-type="NodeAttributeView" data-av-type="table"></div>',
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconDatabase"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.database}</span></div>`,
     */
  },
  {
    filter: ["文档", "子文档", "wendang", "wd", "ziwendang", "zwd", "xjwd"],
    value: Constants.ZWSP + 4,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconFile"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.newFile
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.general.newFile.custom
    )}</span></div>`,
  */
  },
  {
    value: "",
    /*html: "separator",
     */
  },
  {
    filter: ["yijibiaoti", "一级标题", "yjbt", "h1", "heading"],
    value: "# " + Lute.Caret,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconH1"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.heading1
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.heading.heading1.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["erjibiaoti", "二级标题", "ejbt", "h2", "heading"],
    value: "## " + Lute.Caret,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconH2"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.heading2
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.heading.heading2.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["sanjibiaoti", "三级标题", "sjbt", "h3", "heading"],
    value: "### " + Lute.Caret,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconH3"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.heading3
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.heading.heading3.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["sijibiaoti", "四级标题", "sjbt", "h4", "heading"],
    value: "#### " + Lute.Caret,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconH4"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.heading4
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.heading.heading4.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["wujibiaoti", "五级标题", "wjbt", "h5", "heading"],
    value: "##### " + Lute.Caret,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconH5"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.heading5
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.heading.heading5.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["liujibiaoti", "六级标题", "ljbt", "h6", "heading"],
    value: "###### " + Lute.Caret,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconH6"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.heading6
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.heading.heading6.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["无序列表", "wuxuliebiao", "wxlb", "unordered list"],
    value: "* " + Lute.Caret,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconList"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.list}</span><span class="b3-list-item__meta">*&nbsp;</span></div>`,
     */
  },
  {
    filter: ["有序列表", "youxuliebiao", "yxlb", "ordered list"],
    value: "1. " + Lute.Caret,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconOrderedList"></use></svg><span class="b3-list-item__text">${window.siyuan.languages["ordered-list"]}</span><span class="b3-list-item__meta">1.&nbsp;</span></div>`,
     */
  },
  {
    filter: ["任务列表", "renwuliebiao", "rwlb", "task list", "todo list"],
    value: "* [ ] " + Lute.Caret,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconCheck"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.check
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert.check.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["引述", "yinshu", "ys", "bq", "blockquote"],
    value: "> " + Lute.Caret,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconQuote"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.quote}</span><span class="b3-list-item__meta">&gt;</span></div>`,
     */
  },
  {
    filter: ["代码块", "daimakuai", "dmk", "code block"],
    value: "```",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconCode"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.code}</span><span class="b3-list-item__meta">\`\`\`Enter</span></div>`,
     */
  },
  {
    filter: ["表格", "biaoge", "bg", "table"],
    value: `| ${Lute.Caret} |  |  |\n| --- | --- | --- |\n|  |  |  |\n|  |  |  |`,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconTable"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.table
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert.table.custom
    )}</span></div>`,
  */
  },
  {
    filter: [
      "分割线",
      "分隔线",
      "fengexian",
      "fgx",
      "divider",
      "thematic",
      "break",
    ],
    value: "---",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconLine"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.line}</span><span class="b3-list-item__meta">---</span></div>`,
     */
  },
  {
    filter: ["数学公式块", "shuxuegongshikuai", "sxgsk", "math block"],
    value: "$$",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconMath"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.math}</span><span class="b3-list-item__meta">$$</span></div>`,
     */
  },
  {
    filter: ["html"],
    value: "<div>",
    /*html: '<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconHTML5"></use></svg><span class="b3-list-item__text">HTML</span></div>',
     */
  },
  {
    value: "",
    /*html: "separator",
     */
  },
  {
    filter: ["表情", "biaoqing", "bq", "emoji"],
    value: "emoji",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconEmoji"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.emoji}</span><span class="b3-list-item__meta">:</span></div>`,
     */
  },
  {
    filter: ["链接", "lianjie", "lj", "link", "a"],
    value: "a",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconLink"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.link
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert.link.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["粗体", "cuti", "ct", "bold", "strong"],
    value: "strong",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconBold"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.bold
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert.bold.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["斜体", "xieti", "xt", "italic", "em"],
    value: "em",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconItalic"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.italic
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert.italic.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["下划线", "xiahuaxian", "xhx", "underline"],
    value: "u",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconUnderline"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.underline
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert.underline.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["删除线", "shanchuxian", "scx", "strike"],
    value: "s",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconStrike"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.strike
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert.strike.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["标记", "biaoji", "bj", "mark"],
    value: "mark",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconMark"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.mark
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert.mark.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["上标", "shangbiao", "sb", "superscript"],
    value: "sup",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSup"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.sup
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert.sup.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["下标", "xiaobiao", "xb", "subscript"],
    value: "sub",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSub"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.sub
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert.sub.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["标签", "biaoqian", "bq", "tag"],
    value: "tag",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconTags"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.tag
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert.tag.custom
    )}</span></div>`,
  */
  },
  {
    filter: ["行内代码", "hangneidaima", "hndm", "inline code"],
    value: "code",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconInlineCode"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages["inline-code"]
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert["inline-code"].custom
    )}</span></div>`,
  */
  },
  {
    filter: ["行内数学公式", "hangneishuxuegongshi", "hnsxgs", "inline math"],
    value: "inline-math",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconMath"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages["inline-math"]
    }</span><span class="b3-menu__accelerator">${updateHotkeyTip(
      window.siyuan.config.keymap.editor.insert["inline-math"].custom
    )}</span></div>`,
  */
  },
  {
    value: "",
    /*html: "separator",
     */
  },
  {
    filter: ["插入图片或文件", "upload", "上传", "crtphwj", "sc"],
    value: Constants.ZWSP + 3,
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconDownload"></use></svg><span class="b3-list-item__text">${
      window.siyuan.languages.insertAsset
    }</span>
  <input class="b3-form__upload" type="file" ${
    protyle.options.upload.accept
      ? 'multiple="' + protyle.options.upload.accept + '"'
      : ""
  }></div>`,
  */
  },
  {
    filter: ["iframe", "嵌入网址", "qianruwangzhan", "qrwz"],
    value:
      '<iframe sandbox="allow-forms allow-presentation allow-same-origin allow-scripts allow-modals" src="" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>',
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconLanguage"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.insertIframeURL}</span></div>`,
     */
  },
  {
    filter: [
      "插入图片链接",
      "insert image link",
      "charutupianlianjie",
      "crtptp",
    ],
    value: "![]()",
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconImage"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.insertImgURL}</span></div>`,
     */
  },
  {
    filter: [
      "插入视频链接",
      "charushipinlianjie",
      "crsplj",
      "insert video url",
    ],
    value: '<video controls="controls" src=""></video>',
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconVideo"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.insertVideoURL}</span></div>`,
     */
  },
  {
    filter: [
      "插入音频链接",
      "charuyinpinlianjie",
      "cryplj",
      "insert audio url",
    ],
    value: '<audio controls="controls" src=""></audio>',
    /*html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconRecord"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.insertAudioURL}</span></div>`,
     */
  },
  {
    value: "",
    /*html: "separator",
     */
  },
  {
    filter: ["五线谱", "wuxianpu", "wxp", "staff"],
    value: "```abc\n```",
    /*html: `<div class="b3-list-item__first"><span class="b3-list-item__text">ABC</span><span class="b3-list-item__meta">${window.siyuan.languages.staff}</span></div>`,
     */
  },
  {
    filter: ["图表", "tubiao", "tb", "chart"],
    value: "```echarts\n```",
    /*html: `<div class="b3-list-item__first"><span class="b3-list-item__text">Chart</span><span class="b3-list-item__meta">${window.siyuan.languages.chart}</span></div>`,
     */
  },
  {
    filter: ["流程图", "liuchengtu", "lct", "flow chart"],
    value: "```flowchart\n```",
    /*html: '<div class="b3-list-item__first"><span class="b3-list-item__text">FlowChart</span><span class="b3-list-item__meta">Flow Chart</span></div>',
     */
  },
  {
    filter: ["状态图", "zhuangtaitu", "ztt", "graph viz"],
    value: "```graphviz\n```",
    /*html: '<div class="b3-list-item__first"><span class="b3-list-item__text">Graphviz</span><span class="b3-list-item__meta">Graph</span></div>',
     */
  },
  {
    filter: [
      "流程图",
      "时序图",
      "甘特图",
      "liuchengtu",
      "shixutu",
      "gantetu",
      "lct",
      "sxt",
      "gtt",
      "mermaid",
    ],
    value: "```mermaid\n```",
    /*html: '<div class="b3-list-item__first"><span class="b3-list-item__text">Mermaid</span><span class="b3-list-item__meta">Mermaid</span></div>',
     */
  },
  {
    filter: ["脑图", "naotu", "nt", "mind map"],
    value: "```mindmap\n```",
    /*html: `<div class="b3-list-item__first"><span class="b3-list-item__text">Mind map</span><span class="b3-list-item__meta">${window.siyuan.languages.mindmap}</span></div>`,
     */
  },
  {
    filter: ["统一建模语言", "tongyijianmoyuyan", "tyjmyy", "plant uml"],
    value: "```plantuml\n```",
    /*html: '<div class="b3-list-item__first"><span class="b3-list-item__text">PlantUML</span><span class="b3-list-item__meta">UML</span></div>',
     */
  },
  {
    value: "",
    /*html: "separator",
     */
  },
  {
    filter: ["信息样式", "xinxiyangshi", "xxys", "info style"],
    value: `style${Constants.ZWSP}color: var(--b3-card-info-color);background-color: var(--b3-card-info-background);`,
    /*html: `<div class="b3-list-item__first"><div style="color: var(--b3-card-info-color);background-color: var(--b3-card-info-background);" class="color__square">A</div><span class="b3-list-item__text">${window.siyuan.languages.infoStyle}</span></div>`,
     */
  },
  {
    filter: ["成功样式", "chenggongyangshi", "cgys", "success style"],
    value: `style${Constants.ZWSP}color: var(--b3-card-success-color);background-color: var(--b3-card-success-background);`,
    /*html: `<div class="b3-list-item__first"><div style="color: var(--b3-card-success-color);background-color: var(--b3-card-success-background);" class="color__square">A</div><span class="b3-list-item__text">${window.siyuan.languages.successStyle}</span></div>`,
     */
  },
  {
    filter: ["警告样式", "jinggaoyangshi", "jgys", "warning style"],
    value: `style${Constants.ZWSP}color: var(--b3-card-warning-color);background-color: var(--b3-card-warning-background);`,
    /*html: `<div class="b3-list-item__first"><div style="color: var(--b3-card-warning-color);background-color: var(--b3-card-warning-background);" class="color__square">A</div><span class="b3-list-item__text">${window.siyuan.languages.warningStyle}</span></div>`,
     */
  },
  {
    filter: ["错误样式", "cuowuyangshi", "cwys", "error style"],
    value: `style${Constants.ZWSP}color: var(--b3-card-error-color);background-color: var(--b3-card-error-background);`,
    /*html: `<div class="b3-list-item__first"><div style="color: var(--b3-card-error-color);background-color: var(--b3-card-error-background);" class="color__square">A</div><span class="b3-list-item__text">${window.siyuan.languages.errorStyle}</span></div>`,
     */
  },
  {
    filter: ["移除样式", "yichuyangshi", "ycys", "remove style"],
    value: `style${Constants.ZWSP}`,
    /*html: `<div class="b3-list-item__first"><div class="color__square">A</div><span class="b3-list-item__text">${window.siyuan.languages.clearFontStyle}</span></div>`,
     */
  },
  {
    value: "",
    /*html: "separator",
     */
  },
];
let result = {};
for (let item of IHintData) {
  if (item.filter) {
    let key = item.filter.find((e) => {
      let re = /[^\u4E00-\u9FA5]/;
      return !re.test(e);
    });
    if (!key) {
      key = item.filter[0];
    }
    result[key] = item.value;
  }
}
console.log(result);
